# QueryInst

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9221) END FROM WidgetInst WHERE WidgetInstId = 9221) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9215) END FROM WidgetInst WHERE WidgetInstId = 9215)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9221) END FROM WidgetInst WHERE WidgetInstId = 9221) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9215) END FROM WidgetInst WHERE WidgetInstId = 9215)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9226;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9230) END FROM WidgetInst WHERE WidgetInstId = 9230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9230) END FROM WidgetInst WHERE WidgetInstId = 9230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9230) END FROM WidgetInst WHERE WidgetInstId = 9230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9230) END FROM WidgetInst WHERE WidgetInstId = 9230) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9254) END FROM WidgetInst WHERE WidgetInstId = 9254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9254) END FROM WidgetInst WHERE WidgetInstId = 9254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9254) END FROM WidgetInst WHERE WidgetInstId = 9254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9254) END FROM WidgetInst WHERE WidgetInstId = 9254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9272;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 9276) END FROM WidgetInst WHERE WidgetInstId = 9276) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9276) END FROM WidgetInst WHERE WidgetInstId = 9276) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9276) END FROM WidgetInst WHERE WidgetInstId = 9276) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9276) END FROM WidgetInst WHERE WidgetInstId = 9276) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9276) END FROM WidgetInst WHERE WidgetInstId = 9276) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9276) END FROM WidgetInst WHERE WidgetInstId = 9276) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9055) END FROM WidgetInst WHERE WidgetInstId = 9055) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 7467) END FROM WidgetInst WHERE WidgetInstId = 7467)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 9291) END FROM WidgetInst WHERE WidgetInstId = 9291) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 9335) END FROM WidgetInst WHERE WidgetInstId = 9335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 9335) END FROM WidgetInst WHERE WidgetInstId = 9335) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9338;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 9343) END FROM WidgetInst WHERE WidgetInstId = 9343) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 9352) END FROM WidgetInst WHERE WidgetInstId = 9352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9353;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 9352) END FROM WidgetInst WHERE WidgetInstId = 9352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9355;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 9419) END FROM WidgetInst WHERE WidgetInstId = 9419) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 9419) END FROM WidgetInst WHERE WidgetInstId = 9419) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 9427) END FROM WidgetInst WHERE WidgetInstId = 9427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 9436) END FROM WidgetInst WHERE WidgetInstId = 9436) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 9436) END FROM WidgetInst WHERE WidgetInstId = 9436) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 9500) END FROM WidgetInst WHERE WidgetInstId = 9500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9501;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 9500) END FROM WidgetInst WHERE WidgetInstId = 9500) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 9508) END FROM WidgetInst WHERE WidgetInstId = 9508) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 9517) END FROM WidgetInst WHERE WidgetInstId = 9517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 9517) END FROM WidgetInst WHERE WidgetInstId = 9517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9520;


# QueryDef

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Mainland','Island','Levee outflow','River inflow') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Essential' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Levee outflow' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Levee' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Zero normal' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'None: cold start' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Linear bottom friction','Quadratic bottom friction','Hybrid nonlinear bottom friction') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Linear bottom friction' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Quadratic bottom friction','Hybrid nonlinear bottom friction') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Hybrid nonlinear bottom friction' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Quadratic friction nodal attribute - Fric' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mannings N nodal attribute - ManningsN' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Chezy C nodal attribute - ChezyFric' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Bottom roughness length - Z0b_var' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Baroclinic 3D' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'With wetting/drying' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM OrOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('No wetting/drying','With wetting/drying') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'None' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pure primitive equation: TAU0 specified' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spatially discrete/time constant: TAU0 = -1' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spatially variable/time constant: TAU0 = -2' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'From nodal attribute: TAU0 = -3' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'From local friction: TAU0 = -5' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('Barotropic 2DDI using lumped GWCE (explicit)','Barotropic 3D using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Barotropic 2DDI using lumped GWCE (explicit)','Barotropic 3D using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('1','2','3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('2','3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '8' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Off' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NetCDF','NetCDF4') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   12 - Velocity/Pressure OWI files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   12 - Velocity/Pressure OWI files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    2 - Stress/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format','NWS =    5 - Velocity/Pressure - every node/time interval','NWS =   12 - Velocity/Pressure OWI files','NWS =   15 - HWind files','NWS =   16 - GFDL files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    5 - Velocity/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format','NWS =    5 - Velocity/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    8 - Symmetric cyclonic storm from path','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   19 - Asymmetric cyclonic storm from path','NWS =   20 - GAHM Format cyclonic storm path') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   12 - Velocity/Pressure OWI files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   12 - Velocity/Pressure OWI files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =   15 - HWind files','NWS =   16 - GFDL files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   15 - HWind files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified central pressure' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   16 - GFDL files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    3 - Velocity in US Navy Fleet Numeric format','NWS =    6 - Velocity/Pressure on grid') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =    3 - Velocity in US Navy Fleet Numeric format' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =    6 - Velocity/Pressure on grid' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    8 - Symmetric cyclonic storm from path','NWS =   19 - Asymmetric cyclonic storm from path','NWS =   20 - GAHM Format cyclonic storm path') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   20 - GAHM Format cyclonic storm path' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'NWS =    0 - No Wind' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'SWAN coupled' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'None' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'User defined' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Tidal constituents' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User specified' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Not used' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Not used' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Used' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 7 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('Barotropic 2DDI','Barotropic 2DDI using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 29 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 137 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 139 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 140 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 141 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 142 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 144 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 145 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 146 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 159 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 161 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 162 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 163 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 164 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 166 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 167 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 168 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Used' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 192 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 197 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 199 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 200 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 201 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 202 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 204 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 205 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 206 AND WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Transient' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Use dataset' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'JONSWAP constant' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'JONSWAP dataset' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Manning constant' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Manning dataset' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Source terms and propagation' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Full plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Full plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spectral coverage' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spectral coverage' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Source terms and propagation' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant value' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant value' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Full plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 463 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 464 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 466 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 467 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 469 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 470 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 472 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 473 AND WidgetInstId = ?;


